home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_kdelibs.idb / usr / freeware / kde / include / kstdaccel.h.z / kstdaccel.h
Encoding:
C/C++ Source or Header  |  1999-01-26  |  2.8 KB  |  94 lines

  1. /* This file is part of the KDE libraries
  2.     Copyright (C) 1997 Stefan Taferner (taferner@kde.org)
  3.  
  4.     This library is free software; you can redistribute it and/or
  5.     modify it under the terms of the GNU Library General Public
  6.     License as published by the Free Software Foundation; either
  7.     version 2 of the License, or (at your option) any later version.
  8.  
  9.     This library is distributed in the hope that it will be useful,
  10.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  12.     Library General Public License for more details.
  13.  
  14.     You should have received a copy of the GNU Library General Public License
  15.     along with this library; see the file COPYING.LIB.  If not, write to
  16.     the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  17.     Boston, MA 02111-1307, USA.
  18. */
  19. #ifndef KSTDACCEL_H
  20. #define KSTDACCEL_H
  21.  
  22. #include <kkeyconf.h>
  23.  
  24. /** 
  25.  * Convenient methods for access of the common accelerator keys in
  26.  * the key configuration. These standard keybindings that shall be used
  27.  * in all Kde applications. They will be configurable, so do not hardcode
  28.  * the default behaviour.
  29.  */
  30. class KStdAccel: public KKeyConfig
  31. {
  32. public:
  33.   KStdAccel(KConfig* pConfig);
  34.  
  35.   /** Open file. Default: Ctrl-o */
  36.   uint open(void) const;
  37.  
  38.   /** Create a new document (or whatever). Default: Ctrl-n */
  39.   uint openNew(void) const;
  40.  
  41.   /** Close current document. Default: Ctrl-w */
  42.   uint close(void) const;
  43.  
  44.   /** Save current document. Default: Ctrl-s */
  45.   uint save(void) const;
  46.  
  47.   /** Print current document. Default: Ctrl-p */
  48.   uint print(void) const;
  49.  
  50.   /** Quit the program. Default: Ctrl-q */
  51.   uint quit(void) const;
  52.  
  53.   /** Cut selected area and store it in the clipboard. Default: Ctrl-x */
  54.   uint cut(void) const;
  55.  
  56.   /** Copy selected area into the clipboard. Default: Ctrl-c */
  57.   uint copy(void) const;
  58.  
  59.   /** Paste contents of clipboard at mouse/cursor position. Default: Ctrl-v */
  60.   uint paste(void) const;
  61.  
  62.   /** Undo last operation. Default: Ctrl-z */
  63.   uint undo(void) const;
  64.  
  65.   /** Find, search. Default: Ctrl-f */
  66.   uint find(void) const;
  67.  
  68.   /** Find and replace matches. Default: Ctrl-r */
  69.   uint replace(void) const;
  70.  
  71.   /** Toggle insert/overwrite (with visual feedback, e.g. in the statusbar). Default: Insert */
  72.   uint insert(void) const;
  73.  
  74.   /** Goto beginning of current line. Default: Home */
  75.   uint home(void) const;
  76.  
  77.   /** Goto end of current line. Default: End */
  78.   uint end(void) const;
  79.  
  80.   /** Scroll up one page. Default: Prior */
  81.   uint prior(void) const;
  82.  
  83.   /** Scroll down one page. Default: Next */
  84.   uint next(void) const;
  85.  
  86.   /** Help the user in the current situation. Default: F1 */
  87.   uint help(void) const;
  88.  
  89. protected:
  90.   uint readKey(const char* keyName, uint defaultKey=0) const;
  91. };
  92.  
  93. #endif /*kshortcut_h*/
  94.